////////////////////////////////////////
//	File Header
//	Author: Stephen Ringer | stephen.ringer@gmail.com
//	File: SAGAMovementController.h
//
////////////////////////////////////////
#pragma once
////////////////////////////////////////
//	Class Name: SAGAMovementController
//	Purpose:
//		Base class for all types of controllers to inherit from. This already
//			implements a very basic camera that is unaware of its surrounding
//			but able to move totally free like in zero-g space. 
class SAGAMovementController 
{
public:
	SAGAMovementController();
	virtual ~SAGAMovementController();

	virtual void Update(float fElapsedTime)=0;

	// accessor methods
	SAGAVector GetPos()       { return m_vcPos;   }
	SAGAVector GetRight()     { return m_vcRight; }
	SAGAVector GetUp()        { return m_vcUp;    }
	SAGAVector GetDir()       { return m_vcDir;   }
	SAGAVector GetVelocity()  { return m_vcV;     }

	protected:
	SAGAVector m_vcPos;      // position
	SAGAVector m_vcRight;    // right vector
	SAGAVector m_vcUp;       // up vector
	SAGAVector m_vcDir;      // direction vector (look direction)
	SAGAVector m_vcV;        // velocity vector (movement direction)
	SAGAQuat   m_Quat;       // quaternion for rotation

	// rotation speed around local vectors
	float     m_fRollSpd;
	float     m_fPitchSpd;
	float     m_fYawSpd;

	float     m_fRollSpdMax;
	float     m_fPitchSpdMax;
	float     m_fYawSpdMax;

	// rotation value around local vectors
	float     m_fRotX;
	float     m_fRotY;
	float     m_fRotZ;

	// other stuff
	float m_fThrust;

	// protected methods
	virtual void RecalcAxes();
	virtual void Init();
};
//
////////////////////////////////////////